home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / zuck / top9main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-10-06  |  8.0 KB  |  263 lines

  1. VERSION 2.00
  2. Begin Form top9Main 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Top 9 API Tricks for Visual Basic"
  5.    ClientHeight    =   5100
  6.    ClientLeft      =   1110
  7.    ClientTop       =   1485
  8.    ClientWidth     =   6195
  9.    Height          =   5505
  10.    Left            =   1050
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   540
  13.    ScaleWidth      =   540
  14.    Top             =   1140
  15.    Width           =   6315
  16.    Begin CommandButton Command1 
  17.       Caption         =   "9"
  18.       Height          =   435
  19.       Index           =   9
  20.       Left            =   300
  21.       TabIndex        =   8
  22.       Top             =   4500
  23.       Width           =   855
  24.    End
  25.    Begin CommandButton Command1 
  26.       Caption         =   "8"
  27.       Height          =   435
  28.       Index           =   8
  29.       Left            =   300
  30.       TabIndex        =   7
  31.       Top             =   3960
  32.       Width           =   855
  33.    End
  34.    Begin CommandButton Command1 
  35.       Caption         =   "7"
  36.       Height          =   435
  37.       Index           =   7
  38.       Left            =   300
  39.       TabIndex        =   6
  40.       Top             =   3420
  41.       Width           =   855
  42.    End
  43.    Begin CommandButton Command1 
  44.       Caption         =   "6"
  45.       Height          =   435
  46.       Index           =   6
  47.       Left            =   300
  48.       TabIndex        =   5
  49.       Top             =   2880
  50.       Width           =   855
  51.    End
  52.    Begin CommandButton Command1 
  53.       Caption         =   "5"
  54.       Height          =   435
  55.       Index           =   5
  56.       Left            =   300
  57.       TabIndex        =   4
  58.       Top             =   2340
  59.       Width           =   855
  60.    End
  61.    Begin CommandButton Command1 
  62.       Caption         =   "4"
  63.       Height          =   435
  64.       Index           =   4
  65.       Left            =   300
  66.       TabIndex        =   3
  67.       Top             =   1800
  68.       Width           =   855
  69.    End
  70.    Begin CommandButton Command1 
  71.       Caption         =   "3"
  72.       Height          =   435
  73.       Index           =   3
  74.       Left            =   300
  75.       TabIndex        =   2
  76.       Top             =   1260
  77.       Width           =   855
  78.    End
  79.    Begin CommandButton Command1 
  80.       Caption         =   "2"
  81.       Height          =   435
  82.       Index           =   2
  83.       Left            =   300
  84.       TabIndex        =   1
  85.       Top             =   720
  86.       Width           =   855
  87.    End
  88.    Begin CommandButton Command1 
  89.       Caption         =   "1"
  90.       Height          =   435
  91.       Index           =   1
  92.       Left            =   300
  93.       TabIndex        =   0
  94.       Top             =   180
  95.       Width           =   855
  96.    End
  97.    Begin Label Label1 
  98.       BackStyle       =   0  'Transparent
  99.       Caption         =   "Combining Images"
  100.       FontBold        =   -1  'True
  101.       FontItalic      =   0   'False
  102.       FontName        =   "MS Sans Serif"
  103.       FontSize        =   9.75
  104.       FontStrikethru  =   0   'False
  105.       FontUnderline   =   0   'False
  106.       Height          =   315
  107.       Index           =   8
  108.       Left            =   1260
  109.       TabIndex        =   17
  110.       Top             =   4620
  111.       Width           =   2775
  112.    End
  113.    Begin Label Label1 
  114.       BackStyle       =   0  'Transparent
  115.       Caption         =   "Launching a background operation"
  116.       FontBold        =   -1  'True
  117.       FontItalic      =   0   'False
  118.       FontName        =   "MS Sans Serif"
  119.       FontSize        =   9.75
  120.       FontStrikethru  =   0   'False
  121.       FontUnderline   =   0   'False
  122.       Height          =   315
  123.       Index           =   7
  124.       Left            =   1260
  125.       TabIndex        =   16
  126.       Top             =   4080
  127.       Width           =   4755
  128.    End
  129.    Begin Label Label1 
  130.       BackStyle       =   0  'Transparent
  131.       Caption         =   "Screen Capture"
  132.       FontBold        =   -1  'True
  133.       FontItalic      =   0   'False
  134.       FontName        =   "MS Sans Serif"
  135.       FontSize        =   9.75
  136.       FontStrikethru  =   0   'False
  137.       FontUnderline   =   0   'False
  138.       Height          =   315
  139.       Index           =   6
  140.       Left            =   1260
  141.       TabIndex        =   15
  142.       Top             =   3540
  143.       Width           =   2775
  144.    End
  145.    Begin Label Label1 
  146.       BackStyle       =   0  'Transparent
  147.       Caption         =   "Number of Colors Available"
  148.       FontBold        =   -1  'True
  149.       FontItalic      =   0   'False
  150.       FontName        =   "MS Sans Serif"
  151.       FontSize        =   9.75
  152.       FontStrikethru  =   0   'False
  153.       FontUnderline   =   0   'False
  154.       Height          =   315
  155.       Index           =   5
  156.       Left            =   1260
  157.       TabIndex        =   14
  158.       Top             =   3000
  159.       Width           =   3915
  160.    End
  161.    Begin Label Label1 
  162.       BackStyle       =   0  'Transparent
  163.       Caption         =   "Placing Tabs in list boxes"
  164.       FontBold        =   -1  'True
  165.       FontItalic      =   0   'False
  166.       FontName        =   "MS Sans Serif"
  167.       FontSize        =   9.75
  168.       FontStrikethru  =   0   'False
  169.       FontUnderline   =   0   'False
  170.       Height          =   315
  171.       Index           =   4
  172.       Left            =   1260
  173.       TabIndex        =   13
  174.       Top             =   1920
  175.       Width           =   3075
  176.    End
  177.    Begin Label Label1 
  178.       BackStyle       =   0  'Transparent
  179.       Caption         =   "Get a list of running tasks"
  180.       FontBold        =   -1  'True
  181.       FontItalic      =   0   'False
  182.       FontName        =   "MS Sans Serif"
  183.       FontSize        =   9.75
  184.       FontStrikethru  =   0   'False
  185.       FontUnderline   =   0   'False
  186.       Height          =   315
  187.       Index           =   3
  188.       Left            =   1260
  189.       TabIndex        =   12
  190.       Top             =   2460
  191.       Width           =   2775
  192.    End
  193.    Begin Label Label1 
  194.       BackStyle       =   0  'Transparent
  195.       Caption         =   "Close another application"
  196.       FontBold        =   -1  'True
  197.       FontItalic      =   0   'False
  198.       FontName        =   "MS Sans Serif"
  199.       FontSize        =   9.75
  200.       FontStrikethru  =   0   'False
  201.       FontUnderline   =   0   'False
  202.       Height          =   315
  203.       Index           =   2
  204.       Left            =   1260
  205.       TabIndex        =   11
  206.       Top             =   1380
  207.       Width           =   2775
  208.    End
  209.    Begin Label Label1 
  210.       BackStyle       =   0  'Transparent
  211.       Caption         =   "Find the window handle of another application"
  212.       FontBold        =   -1  'True
  213.       FontItalic      =   0   'False
  214.       FontName        =   "MS Sans Serif"
  215.       FontSize        =   9.75
  216.       FontStrikethru  =   0   'False
  217.       FontUnderline   =   0   'False
  218.       Height          =   315
  219.       Index           =   0
  220.       Left            =   1260
  221.       TabIndex        =   10
  222.       Top             =   840
  223.       Width           =   4875
  224.    End
  225.    Begin Label Label1 
  226.       BackStyle       =   0  'Transparent
  227.       Caption         =   "Changing the Default Printer"
  228.       FontBold        =   -1  'True
  229.       FontItalic      =   0   'False
  230.       FontName        =   "MS Sans Serif"
  231.       FontSize        =   9.75
  232.       FontStrikethru  =   0   'False
  233.       FontUnderline   =   0   'False
  234.       Height          =   315
  235.       Index           =   1
  236.       Left            =   1260
  237.       TabIndex        =   9
  238.       Top             =   300
  239.       Width           =   3075
  240.    End
  241. Option Explicit
  242. Sub Command1_Click (Index As Integer)
  243.     Me.Hide
  244.     LastCommand% = Index
  245.     Select Case Index
  246.         Case 1
  247.             ChangePrinter.Show 1
  248.         Case 2, 3
  249.             FindOrClose.Show 1
  250.         Case 4, 5
  251.             TaskListForm.Show 1
  252.         Case 6
  253.             MsgBox Str$(NumberOfColors(hDC)), 0, "Total Colors"
  254.         Case 7
  255.             ScreenCap.Show 1
  256.         Case 8
  257.             LaunchBackground.Show 1
  258.         Case 9
  259.             Combine.Show 1
  260.     End Select
  261.     Me.Show
  262. End Sub
  263.